<template>
  <el-dialog class="check-dialog"
             title="产品详情"
             :visible.sync="visible"
             @close="handleCloseDialog">
    <el-form ref="UpdateDataForm" :model="checkTemp" >
      <el-form-item label="发布时间" prop="">
        <el-date-picker
          v-model="checkTemp.time"
          type="datetime"
          format="yyyy-MM-dd HH:mm"
          readonly
          placeholder="选择日期时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="产品名称" prop="">
        <el-input v-model="checkTemp.name" type="text" readonly="">
        </el-input>
      </el-form-item>
      <p class="check-img-label">产品图片</p>
      <div class="check-img" >
        <img :src="checkTemp.url" alt="" width="100%">
      </div>
      <!--<el-form-item label="标题" prop="">-->
        <!--<img src="checkTemp.img" alt="">-->
      <!--</el-form-item>-->
      <el-form-item label="产品介绍" prop="">
        <el-input v-html="checkTemp.introduce" type="textarea" readonly="">
        </el-input>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="handleCloseDialog" type="primary">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
  export default {
    name: 'check-dialog',
    data() {
      return {
        visible: false
      }
    },
    props: {
      dialogCheckVisible: Boolean,
      checkTemp: Object
    },
    watch: {
      dialogCheckVisible(val) {
        this.visible = val
      }
    },
    methods: {
      handleCloseDialog() {
        this.visible = false
        this.$emit('close', this.visible)
      }
    }
  }
</script>

<style lang="scss" scoped>
  .unit {
    position: absolute;
    right: 10px;
    top: 40px;
    color: #409EFF;
  }
</style>
